/*
 * CommandePoser.cpp
 *
 *  Created on: 19 nov. 2012
 *      Author: aboursier - potier
 */

#include "CommandePoser.h"

void CommandePoser::execute() {
	objet = robot->getObjet();
	try{
		robot->poser();
	}catch (EtatRobot::BadAction){
		pile.pop();
	}
}

Commande* CommandePoser::constructeurVirtuel() {
	Commande* tmp = new CommandePoser(robot);
	pile.push(tmp);
	return tmp;
}

void CommandePoser::desexecute() {
	robot->saisir(objet);
	pile.pop();
}
